<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/dute_favicon_32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/dute_favicon_16x16.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">
  <link rel="manifest" href="/images/manifest.json">
  <meta name="msapplication-config" content="/images/browserconfig.xml">
  <meta http-equiv="Cache-Control" content="no-transform">
  <meta http-equiv="Cache-Control" content="no-siteapp">
  <meta name="google-site-verification" content="mpI5dkydstZXl6UcDCppqktXK0bbvqdZ6LkZ3KNk4Iw">
  <meta name="baidu-site-verification" content="code-a1LksZX2Ds">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"whitestore.top","root":"/","scheme":"Gemini","version":"7.8.0","exturl":true,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":true,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":true,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="深入理解JVM虚拟机 - JDK源码解读《深入理解JVM虚拟机》看过了好几遍了，对于编译一个JDK源码有很强的冲动。这里主要实战使用阿里云进行编译实战  为什么使用阿里云？ 个人电脑奋斗四年了，装虚拟机莫名其妙的死机 阿里云带宽1M，只能用来干些LInux学习的工作   参考博客：https:&#x2F;&#x2F;juejin.im&#x2F;post&#x2F;5c6b9a476fb9a049c30bcebd">
<meta property="og:type" content="article">
<meta property="og:title" content="JDK源码解读">
<meta property="og:url" content="https://whitestore.top/2020/07/26/jdkymjd/index.html">
<meta property="og:site_name" content="爱看书的阿东">
<meta property="og:description" content="深入理解JVM虚拟机 - JDK源码解读《深入理解JVM虚拟机》看过了好几遍了，对于编译一个JDK源码有很强的冲动。这里主要实战使用阿里云进行编译实战  为什么使用阿里云？ 个人电脑奋斗四年了，装虚拟机莫名其妙的死机 阿里云带宽1M，只能用来干些LInux学习的工作   参考博客：https:&#x2F;&#x2F;juejin.im&#x2F;post&#x2F;5c6b9a476fb9a049c30bcebd">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-07-26T04:27:28.000Z">
<meta property="article:modified_time" content="2023-07-16T06:28:09.223Z">
<meta property="article:author" content="阿东">
<meta property="article:tag" content="Java">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://whitestore.top/2020/07/26/jdkymjd/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>JDK源码解读 | 爱看书的阿东</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

<link rel="alternate" href="/atom.xml" title="爱看书的阿东" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">爱看书的阿东</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">赐他一块白色石头，石头上写着新名</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
        <li class="menu-item menu-item-sitemap">

    <a href="/sitemap.xml" rel="section"><i class="fa fa-fw fa-sitemap"></i>站点地图</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    

  <span class="exturl github-corner" data-url="aHR0cHM6Ly9naXRodWIuY29tL2xhenlUaW1lcw==" title="Follow me on GitHub" aria-label="Follow me on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></span>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://whitestore.top/2020/07/26/jdkymjd/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="阿东">
      <meta itemprop="description" content="随遇而安">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="爱看书的阿东">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          JDK源码解读
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-07-26 12:27:28" itemprop="dateCreated datePublished" datetime="2020-07-26T12:27:28+08:00">2020-07-26</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2023-07-16 14:28:09" itemprop="dateModified" datetime="2023-07-16T14:28:09+08:00">2023-07-16</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Java/" itemprop="url" rel="index"><span itemprop="name">Java</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2020/07/26/jdkymjd/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2020/07/26/jdkymjd/" itemprop="commentCount"></span>
    </a>
  </span>
  
  <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="fa fa-file-word-o"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>14k</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="fa fa-clock-o"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>12 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="深入理解JVM虚拟机-JDK源码解读"><a href="#深入理解JVM虚拟机-JDK源码解读" class="headerlink" title="深入理解JVM虚拟机 - JDK源码解读"></a>深入理解JVM虚拟机 - JDK源码解读</h1><p>《深入理解JVM虚拟机》看过了好几遍了，对于编译一个JDK源码有很强的冲动。这里主要实战使用<strong>阿里云</strong>进行编译实战</p>
<ul>
<li>为什么使用阿里云？<ul>
<li>个人电脑奋斗四年了，装虚拟机莫名其妙的死机</li>
<li>阿里云带宽1M，只能用来干些LInux学习的工作</li>
</ul>
</li>
<li>参考博客：<span class="exturl" data-url="aHR0cHM6Ly9qdWVqaW4uaW0vcG9zdC81YzZiOWE0NzZmYjlhMDQ5YzMwYmNlYmQ=" title="https://juejin.im/post/5c6b9a476fb9a049c30bcebd">https://juejin.im/post/5c6b9a476fb9a049c30bcebd<i class="fa fa-external-link"></i></span></li>
</ul>
<a id="more"></a>

<h2 id="JDK源码下载-openJDK7u75"><a href="#JDK源码下载-openJDK7u75" class="headerlink" title="JDK源码下载 - openJDK7u75"></a>JDK源码下载 - openJDK7u75</h2><ul>
<li>地址：<span class="exturl" data-url="aHR0cHM6Ly9kb3dubG9hZC5qYXZhLm5ldC9vcGVuamRrL2pkazd1NzUvcmkvb3Blbmpkay03dTc1LXNyYy1iMTMtMThfZGVjXzIwMTQuemlw" title="https://download.java.net/openjdk/jdk7u75/ri/openjdk-7u75-src-b13-18_dec_2014.zip">https://download.java.net/openjdk/jdk7u75/ri/openjdk-7u75-src-b13-18_dec_2014.zip<i class="fa fa-external-link"></i></span></li>
</ul>
<h2 id="Bootstrap-JDK"><a href="#Bootstrap-JDK" class="headerlink" title="Bootstrap JDK"></a>Bootstrap JDK</h2><ul>
<li><p>编译OpenJDK7需要 Bootstrap JDK U14 之后的版本</p>
</li>
<li><p>地址：</p>
<p><span class="exturl" data-url="aHR0cHM6Ly93d3cub3JhY2xlLmNvbS90ZWNobmV0d29yay9qYXZhL2phdmFzZS9kb3dubG9hZHMvamF2YS1hcmNoaXZlLWRvd25sb2Fkcy1qYXZhc2U3LTUyMTI2MS5odG1s" title="https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html">https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html<i class="fa fa-external-link"></i></span></p>
<ul>
<li>下载 <code>linux.tag.gz包</code></li>
</ul>
</li>
<li><p>有条件尽量科学上网下载比较慢</p>
</li>
</ul>
<h2 id="Apach-Ant-1-7-1版本"><a href="#Apach-Ant-1-7-1版本" class="headerlink" title="Apach Ant 1.7.1版本"></a>Apach Ant 1.7.1版本</h2><ul>
<li>地址：<span class="exturl" data-url="aHR0cHM6Ly9hbnQuYXBhY2hlLm9yZy9iaW5kb3dubG9hZC5jZ2k=" title="https://ant.apache.org/bindownload.cgi">https://ant.apache.org/bindownload.cgi<i class="fa fa-external-link"></i></span></li>
<li>还需要一个apach ant 1.7.1 版本</li>
<li>这里选择了: 1.9.14版本</li>
</ul>
<h2 id="前置依赖："><a href="#前置依赖：" class="headerlink" title="前置依赖："></a>前置依赖：</h2><ul>
<li>OpenJDK要用到很多的gcc，java，c的库函数，需要进行前置准备</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">yum -y install build-essential gawk m4 openjdk6-jdk libasound2-print-dev binutils libmotif3 libmotif-dev ant</span><br><span class="line">yum install libX* #有可能会缺失的库，先提前安装</span><br></pre></td></tr></table></figure>

<h2 id="首次编译"><a href="#首次编译" class="headerlink" title="首次编译"></a>首次编译</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># 进入到openjdk的目录</span><br><span class="line">cd openjdk所在目录</span><br><span class="line"># 解压</span><br><span class="line">unzip openjdk</span><br><span class="line"># 编译</span><br><span class="line">cd open jdk</span><br><span class="line"># 第一次编译，输出到对应文件</span><br><span class="line">make sanity &gt; error.txt</span><br></pre></td></tr></table></figure>

<ul>
<li>不出所料，编译失败了，我们可以根据错误日志来进行调整</li>
<li>根据错误，整理一下错误点</li>
<li>下面参考书籍的内容进行设置</li>
</ul>
<h2 id="设置环境变量"><a href="#设置环境变量" class="headerlink" title="设置环境变量"></a>设置环境变量</h2><ul>
<li><p>gcc 4.3 版本以上</p>
</li>
<li><p>必须设置两个</p>
<ul>
<li>LANG：编译语言</li>
<li>ALT_BOOTDIR：Bootstrap JDK 1.7 的版本</li>
</ul>
</li>
<li><p>设置环境变量</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">export LANG&#x3D;C</span><br><span class="line">export ALT_BOOTDIR&#x3D;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;jdk1.7.0_80</span><br></pre></td></tr></table></figure>
</li>
<li><p>去掉原本的JDK环境变量</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">unset JAVA_HOME</span><br><span class="line">unset CLASSPATH</span><br></pre></td></tr></table></figure>

</li>
</ul>
<h2 id="OpenJDK-错误处理"><a href="#OpenJDK-错误处理" class="headerlink" title="OpenJDK 错误处理"></a>OpenJDK 错误处理</h2><h3 id="错误1：-缺少打印-Cups-依赖"><a href="#错误1：-缺少打印-Cups-依赖" class="headerlink" title="错误1： 缺少打印 Cups 依赖"></a>错误1： 缺少打印 Cups 依赖</h3><p>错误信息</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">ERROR: You do not have access to valid Cups header files. </span><br><span class="line">       Please check your access to </span><br><span class="line">           &#x2F;usr&#x2F;include&#x2F;cups&#x2F;cups.h </span><br><span class="line">       and&#x2F;or check your value of ALT_CUPS_HEADERS_PATH, </span><br><span class="line">       CUPS is frequently pre-installed on many systems, </span><br><span class="line">       or may be downloaded from http:&#x2F;&#x2F;www.cups.org</span><br></pre></td></tr></table></figure>

<p>处理方式：</p>
<p>缺少<code>cups</code>打印框架，解决：</p>
<ol>
<li>可以根据如下命令查找</li>
</ol>
<p><code>yum search cups</code> 查找对应依赖</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre></td><td class="code"><pre><span class="line">&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D; N&#x2F;S matched: cups &#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">apcupsd-cgi.x86_64 : Web interface for apcupsd</span><br><span class="line">apcupsd-gui.x86_64 : GUI interface for apcupsd</span><br><span class="line">bluez-cups.x86_64 : CUPS printer backend for Bluetooth printers</span><br><span class="line">cups.x86_64 : CUPS printing system</span><br><span class="line">cups-bjnp.x86_64 : CUPS backend for the Canon BJNP network printers</span><br><span class="line">cups-client.x86_64 : CUPS printing system - client programs</span><br><span class="line">cups-devel.i686 : CUPS printing system - development environment</span><br><span class="line">cups-devel.x86_64 : CUPS printing system - development environment</span><br><span class="line">cups-filesystem.noarch : CUPS printing system - directory layout</span><br><span class="line">cups-filters.x86_64 : OpenPrinting CUPS filters and backends</span><br><span class="line">cups-filters-devel.i686 : OpenPrinting CUPS filters and backends - development environment</span><br><span class="line">cups-filters-devel.x86_64 : OpenPrinting CUPS filters and backends - development environment</span><br><span class="line">cups-filters-libs.i686 : OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries</span><br><span class="line">cups-filters-libs.x86_64 : OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries</span><br><span class="line">cups-ipptool.x86_64 : CUPS printing system - tool for performing IPP requests</span><br><span class="line">cups-libs.x86_64 : CUPS printing system - libraries</span><br><span class="line">cups-libs.i686 : CUPS printing system - libraries</span><br><span class="line">cups-lpd.x86_64 : CUPS printing system - lpd emulation</span><br><span class="line">cups-pdf.x86_64 : Extension for creating pdf-Files with CUPS</span><br><span class="line">cups-x2go.noarch : CUPS backend for printing from X2Go</span><br><span class="line">dymo-cups-drivers.x86_64 : DYMO LabelWriter Drivers for CUPS</span><br><span class="line">ghostscript-cups.x86_64 : CUPS filter for interpreting PostScript and PDF</span><br><span class="line">gutenprint-cups.x86_64 : CUPS drivers for Canon, Epson, HP and compatible printers</span><br><span class="line">perl-Net-CUPS.x86_64 : Perl bindings to the CUPS C API Interface</span><br><span class="line">python-cups.x86_64 : Python bindings for CUPS</span><br><span class="line">python-cups-doc.x86_64 : Documentation for python-cups</span><br><span class="line">python3-cups-doc.x86_64 : Documentation for python-cups</span><br><span class="line">python34-cups.x86_64 : Python 3 bindings for CUPS API, known as pycups</span><br><span class="line">python36-cups.x86_64 : Python 3 bindings for CUPS API, known as pycups</span><br><span class="line">apcupsd.x86_64 : APC UPS Power Control Daemon</span><br><span class="line">cups-pk-helper.x86_64 : A helper that makes system-config-printer use PolicyKit</span><br><span class="line">foomatic-filters.x86_64 : CUPS print filters for the foomatic package</span><br><span class="line">samba-krb5-printing.x86_64 : Samba CUPS backend for printing with Kerberos</span><br><span class="line"></span><br><span class="line">  Name and summary matches only, use &quot;search all&quot; for everything.</span><br></pre></td></tr></table></figure>

<ol>
<li>安装Cups</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum install cups-devel.x86_64</span><br></pre></td></tr></table></figure>

<h3 id="错误2：-缺少-Freetype-依赖"><a href="#错误2：-缺少-Freetype-依赖" class="headerlink" title="错误2： 缺少 Freetype 依赖"></a>错误2： 缺少 Freetype 依赖</h3><p>报错情况：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">ERROR: FreeType version  2.3.0  or higher is required. </span><br><span class="line"> make[2]: 进入目录“&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;jdk&#x2F;make&#x2F;tools&#x2F;freetypecheck”</span><br><span class="line">&#x2F;bin&#x2F;mkdir -p &#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;build&#x2F;linux-amd64&#x2F;btbins</span><br><span class="line">rm -f &#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;build&#x2F;linux-amd64&#x2F;btbins&#x2F;freetype_versioncheck</span><br><span class="line">make[2]: 离开目录“&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;jdk&#x2F;make&#x2F;tools&#x2F;freetypecheck”</span><br><span class="line">Failed to build freetypecheck.</span><br></pre></td></tr></table></figure>

<p>处理方式：</p>
<ol>
<li><code>yum search freetype</code></li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D; N&#x2F;S matched: freetype &#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">freetype-demos.x86_64 : A collection of FreeType demos</span><br><span class="line">freetype-devel.i686 : FreeType development libraries and header files</span><br><span class="line">freetype-devel.x86_64 : FreeType development libraries and header files</span><br><span class="line">mingw32-freetype-static.noarch : Static version of the MinGW Windows Freetype library</span><br><span class="line">mingw64-freetype-static.noarch : Static version of the MinGW Windows Freetype library</span><br><span class="line">python-freetype.noarch : Freetype python bindings</span><br><span class="line">freetype.x86_64 : A free and portable font rendering engine</span><br><span class="line">freetype.i686 : A free and portable font rendering engine</span><br><span class="line">ftgl.x86_64 : OpenGL frontend to Freetype 2</span><br><span class="line">mingw32-freetype.noarch : Free and portable font rendering engine</span><br><span class="line">mingw64-freetype.noarch : Free and portable font rendering engine</span><br></pre></td></tr></table></figure>

<ol>
<li>执行命令<code>yum install freetype-devel.x86_64 -y</code></li>
</ol>
<h3 id="错误3：缺少声卡Alsa依赖，需要安装"><a href="#错误3：缺少声卡Alsa依赖，需要安装" class="headerlink" title="错误3：缺少声卡Alsa依赖，需要安装"></a>错误3：缺少声卡Alsa依赖，需要安装</h3><p>错误信息</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">ERROR: You seem to not have installed ALSA 0.9.1 or higher. </span><br><span class="line">       Please install ALSA (drivers and lib). You can download the </span><br><span class="line">       source distribution from http:&#x2F;&#x2F;www.alsa-project.org or go to </span><br><span class="line">       http:&#x2F;&#x2F;www.freshrpms.net&#x2F;docs&#x2F;alsa&#x2F; for precompiled RPM packages.</span><br></pre></td></tr></table></figure>

<p>处理方式：</p>
<ol>
<li><code>yum search alsa</code></li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"> * updates: mirrors.aliyun.com</span><br><span class="line">&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D; N&#x2F;S matched: alsa &#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">alsa-firmware.noarch : Firmware for several ALSA-supported sound cards</span><br><span class="line">alsa-lib.x86_64 : The Advanced Linux Sound Architecture (ALSA) library</span><br><span class="line">alsa-lib.i686 : The Advanced Linux Sound Architecture (ALSA) library</span><br><span class="line">alsa-lib-devel.i686 : Development files from the ALSA library</span><br><span class="line">alsa-lib-devel.x86_64 : Development files from the ALSA library</span><br><span class="line">alsa-plugins-arcamav.i686 : Arcam AV amplifier plugin for ALSA</span><br><span class="line">alsa-plugins-arcamav.x86_64 : Arcam AV amplifier plugin for ALSA</span><br><span class="line">alsa-plugins-maemo.i686 : Maemo plugin for ALSA</span><br><span class="line">alsa-plugins-maemo.x86_64 : Maemo plugin for ALSA</span><br><span class="line">alsa-plugins-oss.i686 : Oss PCM output plugin for ALSA</span><br><span class="line">alsa-plugins-oss.x86_64 : Oss PCM output plugin for ALSA</span><br><span class="line">alsa-plugins-pulseaudio.i686 : Alsa to PulseAudio backend</span><br><span class="line">alsa-plugins-pulseaudio.x86_64 : Alsa to PulseAudio backend</span><br><span class="line">alsa-plugins-samplerate.i686 : External rate converter plugin for ALSA</span><br><span class="line">alsa-plugins-samplerate.x86_64 : External rate converter plugin for ALSA</span><br><span class="line">alsa-plugins-upmix.i686 : Upmixer channel expander plugin for ALSA</span><br><span class="line">alsa-plugins-upmix.x86_64 : Upmixer channel expander plugin for ALSA</span><br><span class="line">alsa-plugins-usbstream.i686 : USB stream plugin for ALSA</span><br><span class="line">alsa-plugins-usbstream.x86_64 : USB stream plugin for ALSA</span><br><span class="line">alsa-plugins-vdownmix.i686 : Downmixer to stereo plugin for ALSA</span><br><span class="line">alsa-plugins-vdownmix.x86_64 : Downmixer to stereo plugin for ALSA</span><br><span class="line">alsa-tools.x86_64 : Specialist tools for ALSA</span><br><span class="line">alsa-tools-firmware.x86_64 : ALSA tools for uploading firmware to some soundcards</span><br><span class="line">alsa-utils.x86_64 : Advanced Linux Sound Architecture (ALSA) utilities</span><br><span class="line">alsa-plugins-speex.i686 : Rate Converter Plugin Using Speex Resampler</span><br><span class="line">alsa-plugins-speex.x86_64 : Rate Converter Plugin Using Speex Resampler</span><br></pre></td></tr></table></figure>

<ol>
<li>安装依赖：<code>yum -y install alsa-lib* alsa-util*</code></li>
</ol>
<h3 id="错误4：缺少Ant依赖"><a href="#错误4：缺少Ant依赖" class="headerlink" title="错误4：缺少Ant依赖"></a>错误4：缺少Ant依赖</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">ERROR: The version of ant being used is older than </span><br><span class="line">       the required version of &#39;1.7.1&#39;. </span><br><span class="line">       The version of ant found was &#39;&#39;.</span><br></pre></td></tr></table></figure>

<p>处理方式：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yum install ant -y</span><br></pre></td></tr></table></figure>

<h3 id="错误5：缺少C语言环境变量"><a href="#错误5：缺少C语言环境变量" class="headerlink" title="错误5：缺少C语言环境变量"></a>错误5：缺少C语言环境变量</h3><p>错误信息</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">WARNING: LANG has been set to zh_CN.UTF-8, this can cause build failures. </span><br><span class="line">         Try setting LANG to &#39;C&#39;.</span><br></pre></td></tr></table></figure>

<p>处理方式：</p>
<ol>
<li><code>export LANG=C</code>设置C语言环境</li>
</ol>
<h2 id="第二次编译"><a href="#第二次编译" class="headerlink" title="第二次编译"></a>第二次编译</h2><p>需要再次输入命令<code>make santify</code> ，知道看到如下信息</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Sanity check passed.</span><br></pre></td></tr></table></figure>

<h2 id="编写启动脚本"><a href="#编写启动脚本" class="headerlink" title="编写启动脚本"></a>编写启动脚本</h2><ul>
<li>经过上面的测试，再根据JVM虚拟机的内容，编写了下面一个通用的命令脚本</li>
</ul>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br></pre></td><td class="code"><pre><span class="line">#!&#x2F;bin&#x2F;bash</span><br><span class="line"># 语言选项，必须设置，否者编译之后会出现一个HashTable槽的错误的NPE的错</span><br><span class="line">export LANG&#x3D;C</span><br><span class="line"># Bootstrap JDK 的安装路径</span><br><span class="line">export ALT_BOOTDIR&#x3D;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;jdk1.7.0_80</span><br><span class="line"># 允许自动下载数据</span><br><span class="line">export ALLOW_DOWNLOADS&#x3D;true</span><br><span class="line">#并行编译的线程数，设置为和CPU内核数量一致即可</span><br><span class="line"></span><br><span class="line">export HOTSPOT_BUILD_JOBS&#x3D;6</span><br><span class="line"></span><br><span class="line">export ALT_PARALLEL_COMPILE_JOBS&#x3D;6</span><br><span class="line"></span><br><span class="line">#比较本次build出来的映像与先前版本的差异。这对我们来说没有意义，</span><br><span class="line"></span><br><span class="line">#必须设置为false，否则sanity检查会报缺少先前版本JDK的映像的错误提示。</span><br><span class="line"></span><br><span class="line">#如果已经设置dev或者DEV_ONLY&#x3D;true，这个不显式设置也行</span><br><span class="line"></span><br><span class="line">export SKIP_COMPARE_IMAGES&#x3D;true</span><br><span class="line"></span><br><span class="line">#使用预编译头文件，不加这个编译会更慢一些</span><br><span class="line"></span><br><span class="line">export USE_PRECOMPILED_HEADER&#x3D;true</span><br><span class="line"></span><br><span class="line">#要编译的内容</span><br><span class="line"></span><br><span class="line">export BUILD_LANGTOOLS&#x3D;true</span><br><span class="line"></span><br><span class="line">#export BUILD_JAXP&#x3D;false</span><br><span class="line"></span><br><span class="line">#export BUILD_JAXWS&#x3D;false</span><br><span class="line"></span><br><span class="line">#export BUILD_CORBA&#x3D;false</span><br><span class="line"></span><br><span class="line">export BUILD_HOTSPOT&#x3D;true</span><br><span class="line"></span><br><span class="line">export BUILD_JDK&#x3D;true</span><br><span class="line"></span><br><span class="line">#要编译的版本</span><br><span class="line"></span><br><span class="line">#export SKIP_DEBUG_BUILD&#x3D;false</span><br><span class="line"></span><br><span class="line">#export SKIP_FASTDEBUG_BUILD&#x3D;true</span><br><span class="line"></span><br><span class="line">#export DEBUG_NAME&#x3D;debug</span><br><span class="line"></span><br><span class="line">#把它设置为false可以避开javaws和浏览器Java插件之类的部分的build</span><br><span class="line"></span><br><span class="line">BUILD_DEPLOY&#x3D;false</span><br><span class="line"></span><br><span class="line">#把它设置为false就不会build出安装包。因为安装包里有些奇怪的依赖，</span><br><span class="line"></span><br><span class="line">#但即便不build出它也已经能得到完整的JDK映像，所以还是别build它好了</span><br><span class="line"></span><br><span class="line">BUILD_INSTALL&#x3D;false</span><br><span class="line"></span><br><span class="line">#编译结果所存放的路径</span><br><span class="line"></span><br><span class="line">export ALT_OUTPUTDIR&#x3D;&#x2F;Users&#x2F;IcyFenix&#x2F;Develop&#x2F;JVM&#x2F;jdkBuild&#x2F;openjdk_7u4&#x2F;build</span><br><span class="line"></span><br><span class="line">#这两个环境变量必须去掉，不然会有很诡异的事情发生（我没有具体查过这些&quot;诡异的</span><br><span class="line">#事情&quot;，Makefile脚本检查到有这2个变量就会提示警告）</span><br><span class="line"></span><br><span class="line">unset JAVA_HOME</span><br><span class="line"></span><br><span class="line">unset CLASSPATH</span><br><span class="line"></span><br><span class="line">make 2＞＆1|tee $ALT_OUTPUTDIR&#x2F;build.log</span><br></pre></td></tr></table></figure>

<h3 id="启动脚本参考："><a href="#启动脚本参考：" class="headerlink" title="启动脚本参考："></a>启动脚本参考：</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br></pre></td><td class="code"><pre><span class="line">#语言选项，这个必须设置，否则编译好后会出现一个HashTable的NPE错</span><br><span class="line">export LANG&#x3D;C</span><br><span class="line"></span><br><span class="line">#Bootstrap JDK的安装路径。必须设置。 </span><br><span class="line">export ALT_BOOTDIR&#x3D;&#x2F;usr&#x2F;local&#x2F;java&#x2F;jdk1.7.0_04</span><br><span class="line"></span><br><span class="line">#允许自动下载依赖</span><br><span class="line">export ALLOW_DOWNLOADS&#x3D;true</span><br><span class="line"></span><br><span class="line">#并行编译的线程数，设置为和CPU内核数量一致即可</span><br><span class="line">export HOTSPOT_BUILD_JOBS&#x3D;4</span><br><span class="line">export ALT_PARALLEL_COMPILE_JOBS&#x3D;4</span><br><span class="line"></span><br><span class="line">#比较本次build出来的映像与先前版本的差异。这个对我们来说没有意义，必须设置为false，否则sanity检查会报缺少先前版本JDK的映像。如果有设置dev或者DEV_ONLY&#x3D;true的话这个不显式设置也行。 </span><br><span class="line">export SKIP_COMPARE_IMAGES&#x3D;true</span><br><span class="line"></span><br><span class="line">#使用预编译头文件，不加这个编译会更慢一些</span><br><span class="line">export USE_PRECOMPILED_HEADER&#x3D;true</span><br><span class="line"></span><br><span class="line">#要编译的内容</span><br><span class="line">export BUILD_LANGTOOLS&#x3D;true </span><br><span class="line">#export BUILD_JAXP&#x3D;false</span><br><span class="line">#export BUILD_JAXWS&#x3D;false </span><br><span class="line">#export BUILD_CORBA&#x3D;false</span><br><span class="line">export BUILD_HOTSPOT&#x3D;true </span><br><span class="line">export BUILD_JDK&#x3D;true</span><br><span class="line"></span><br><span class="line">#要编译的版本</span><br><span class="line">#export SKIP_DEBUG_BUILD&#x3D;false</span><br><span class="line">#export SKIP_FASTDEBUG_BUILD&#x3D;true</span><br><span class="line">#export DEBUG_NAME&#x3D;debug</span><br><span class="line"></span><br><span class="line">#把它设置为false可以避开javaws和浏览器Java插件之类的部分的build。 </span><br><span class="line">BUILD_DEPLOY&#x3D;false</span><br><span class="line"></span><br><span class="line">#把它设置为false就不会build出安装包。因为安装包里有些奇怪的依赖，但即便不build出它也已经能得到完整的JDK映像，所以还是别build它好了。</span><br><span class="line">BUILD_INSTALL&#x3D;false</span><br><span class="line"></span><br><span class="line">#这两个环境变量必须去掉，不然会有很诡异的事情发生（我没有具体查过这些“”诡异的事情”，Makefile脚本检查到有这2个变量就会提示警告“）</span><br><span class="line">unset JAVA_HOME</span><br><span class="line">unset CLASSPATH</span><br><span class="line"></span><br><span class="line">make 2&gt;&amp;1 | tee $ALT_OUTPUTDIR&#x2F;build.log</span><br></pre></td></tr></table></figure>

<h3 id="个人版本"><a href="#个人版本" class="headerlink" title="个人版本:"></a>个人版本:</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line">export LANG&#x3D;C</span><br><span class="line">export ALT_BOOTDIR&#x3D;&#x2F;usr&#x2F;local&#x2F;software&#x2F;jdk1.7</span><br><span class="line">export ALLOW_DOWNLOADS&#x3D;true</span><br><span class="line">export HOTSPOT_BUILD_JOBDS&#x3D;1</span><br><span class="line">export ALT_PARALLEL_COMPILE_JOBS&#x3D;1</span><br><span class="line">export SKIP_COMPARE_IMAGES&#x3D;true</span><br><span class="line">export USE_PRECOMPLIED_HEADER&#x3D;true</span><br><span class="line">export BUILD_LANGTOOLS&#x3D;true</span><br><span class="line">export BUILD_JAXP&#x3D;false</span><br><span class="line">export BUILD_JAXWS&#x3D;false</span><br><span class="line">export BUILD_CORBA&#x3D;false</span><br><span class="line">export BUILD_HOTSPOT&#x3D;true</span><br><span class="line">export BUILD_JDK&#x3D;true</span><br><span class="line"></span><br><span class="line">export SKIP_DEBUG_BUILD&#x3D;false</span><br><span class="line">export SKIP_FASTDEBUG_BUILD&#x3D;true</span><br><span class="line">export DEBUG_NAME&#x3D;debug</span><br><span class="line"></span><br><span class="line">BUILD_DEPLOY&#x3D;false</span><br><span class="line">BUILD_INSTALL&#x3D;false</span><br><span class="line"></span><br><span class="line">unset JAVA_HOME</span><br><span class="line">unset CLASSPATH</span><br><span class="line"></span><br><span class="line">make 2&gt;&amp;1 | tee &#x2F;usr&#x2F;local&#x2F;software&#x2F;build.log</span><br></pre></td></tr></table></figure>

<h2 id="开始编译"><a href="#开始编译" class="headerlink" title="开始编译"></a>开始编译</h2><ul>
<li><p>使用上一节写好的脚本</p>
</li>
<li><p>运行下面的命令</p>
<ul>
<li><code>chmod +x run.sh</code></li>
<li><code>./run.sh</code></li>
</ul>
</li>
<li><p>经过多次尝试，现在出现如下报错：</p>
<p><code>g++: internal compiler error: Killed (program cc1plus)</code></p>
</li>
<li><p>处理方式</p>
<ul>
<li>内存不足，需要扩充内存</li>
</ul>
</li>
</ul>
<h2 id="问题收集："><a href="#问题收集：" class="headerlink" title="问题收集："></a>问题收集：</h2><h3 id="1-编译过程突然报错，报错信息如下"><a href="#1-编译过程突然报错，报错信息如下" class="headerlink" title="1. 编译过程突然报错，报错信息如下"></a>1. 编译过程突然报错，报错信息如下</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">g++: internal compiler error: Killed (program cc1plus)</span><br><span class="line">Please submit a full bug report,</span><br><span class="line">with preprocessed source if appropriate.</span><br><span class="line">See &lt;http:&#x2F;&#x2F;bugzilla.redhat.com&#x2F;bugzilla&gt; for instructions.</span><br><span class="line">make[7]: *** [ad_x86_64.o] Error 4</span><br><span class="line">make[7]: Leaving directory &#96;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;build&#x2F;linux-amd64-debug&#x2F;hotspot&#x2F;outputdir&#x2F;linux_amd64_compiler2&#x2F;jvmg&#39;</span><br><span class="line">make[6]: *** [the_vm] Error 2</span><br><span class="line">make[6]: Leaving directory &#96;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;build&#x2F;linux-amd64-debug&#x2F;hotspot&#x2F;outputdir&#x2F;linux_amd64_compiler2&#x2F;jvmg&#39;</span><br><span class="line">make[5]: *** [jvmg] Error 2</span><br><span class="line">make[5]: Leaving directory &#96;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;build&#x2F;linux-amd64-debug&#x2F;hotspot&#x2F;outputdir&#39;</span><br><span class="line">make[4]: *** [generic_build2] Error 2</span><br><span class="line">make[4]: Leaving directory &#96;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;hotspot&#x2F;make&#39;</span><br><span class="line">make[3]: *** [jvmg] Error 2</span><br><span class="line">make[3]: Leaving directory &#96;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#x2F;hotspot&#x2F;make&#39;</span><br><span class="line">make[2]: *** [hotspot-build] Error 2</span><br><span class="line">make[2]: Leaving directory &#96;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#39;</span><br><span class="line">make[1]: *** [generic_debug_build] Error 2</span><br><span class="line">make[1]: Leaving directory &#96;&#x2F;usr&#x2F;local&#x2F;software&#x2F;openjdk&#39;</span><br><span class="line">make: *** [build_debug_image] Error 2</span><br></pre></td></tr></table></figure>

<blockquote>
<p>分析原因：</p>
<ol>
<li>可能是阿里云买的最低配，导致编译的时候内存爆了</li>
<li>Bootstrap JDK版本和书本的不一致，尝试按照书本一模一样的方式处理</li>
<li>脚本建议手敲，复制黏贴容易错误</li>
</ol>
</blockquote>
<h2 id="参考资料："><a href="#参考资料：" class="headerlink" title="参考资料："></a>参考资料：</h2><p><span class="exturl" data-url="aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3ppdG9uZ19jY251L2FydGljbGUvZGV0YWlscy81MDE0OTc1Nw==" title="https://blog.csdn.net/zitong_ccnu/article/details/50149757">https://blog.csdn.net/zitong_ccnu/article/details/50149757<i class="fa fa-external-link"></i></span> CenterOS7 编译OpenJDK7</p>
<p><span class="exturl" data-url="aHR0cHM6Ly93d3cuYmJzbWF4LmNvbS9BL0dCSnJLTGE1MGUv" title="https://www.bbsmax.com/A/GBJrKLa50e/">https://www.bbsmax.com/A/GBJrKLa50e/<i class="fa fa-external-link"></i></span> 案例2</p>
<p><span class="exturl" data-url="aHR0cHM6Ly9obGx2bS1ncm91cC5pdGV5ZS5jb20vZ3JvdXAvdG9waWMvMzU4MDM=" title="https://hllvm-group.iteye.com/group/topic/35803">https://hllvm-group.iteye.com/group/topic/35803<i class="fa fa-external-link"></i></span> JVM的一些讨论，值得看看</p>
<h1 id="处理问题的几个套路"><a href="#处理问题的几个套路" class="headerlink" title="处理问题的几个套路"></a>处理问题的几个套路</h1><h2 id="套路一：缺少依赖，却不知道安装的具体内容"><a href="#套路一：缺少依赖，却不知道安装的具体内容" class="headerlink" title="套路一：缺少依赖，却不知道安装的具体内容"></a>套路一：缺少依赖，却不知道安装的具体内容</h2><p>当提示缺少依赖，而你不知道要<code>yum install</code>什么时，你可以根据提示关键字搜一下<code>yum search</code>，然后在搜出的结果列表中，对有着相同前缀的依赖使用后缀通配符一键下载</p>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/kity@2.0.4/dist/kity.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/kityminder-core@1.4.50/dist/kityminder.core.min.js"></script><script defer="true" type="text/javascript" src="https://cdn.jsdelivr.net/npm/hexo-simple-mindmap@0.2.0/dist/mindmap.min.js"></script><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/hexo-simple-mindmap@0.2.0/dist/mindmap.min.css">
    </div>

    
    
    
        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>lazytime
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="https://whitestore.top/2020/07/26/jdkymjd/" title="JDK源码解读">https://whitestore.top/2020/07/26/jdkymjd/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <span class="exturl" data-url="aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLzQuMC96aC1DTg=="><i class="fa fa-fw fa-creative-commons"></i>BY-NC</span> 许可协议。转载请注明出处！
  </li>
</ul>
</div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Java/" rel="tag"># Java</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2020/07/26/gostudy1/" rel="prev" title="Go语言学习笔记（一）">
      <i class="fa fa-chevron-left"></i> Go语言学习笔记（一）
    </a></div>
      <div class="post-nav-item">
    <a href="/2020/07/26/hexo-study1/" rel="next" title="【Hexo】Hexo 搭建思维导图以及使用">
      【Hexo】Hexo 搭建思维导图以及使用 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#深入理解JVM虚拟机-JDK源码解读"><span class="nav-number">1.</span> <span class="nav-text">深入理解JVM虚拟机 - JDK源码解读</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#JDK源码下载-openJDK7u75"><span class="nav-number">1.1.</span> <span class="nav-text">JDK源码下载 - openJDK7u75</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Bootstrap-JDK"><span class="nav-number">1.2.</span> <span class="nav-text">Bootstrap JDK</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Apach-Ant-1-7-1版本"><span class="nav-number">1.3.</span> <span class="nav-text">Apach Ant 1.7.1版本</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#前置依赖："><span class="nav-number">1.4.</span> <span class="nav-text">前置依赖：</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#首次编译"><span class="nav-number">1.5.</span> <span class="nav-text">首次编译</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#设置环境变量"><span class="nav-number">1.6.</span> <span class="nav-text">设置环境变量</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#OpenJDK-错误处理"><span class="nav-number">1.7.</span> <span class="nav-text">OpenJDK 错误处理</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#错误1：-缺少打印-Cups-依赖"><span class="nav-number">1.7.1.</span> <span class="nav-text">错误1： 缺少打印 Cups 依赖</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#错误2：-缺少-Freetype-依赖"><span class="nav-number">1.7.2.</span> <span class="nav-text">错误2： 缺少 Freetype 依赖</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#错误3：缺少声卡Alsa依赖，需要安装"><span class="nav-number">1.7.3.</span> <span class="nav-text">错误3：缺少声卡Alsa依赖，需要安装</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#错误4：缺少Ant依赖"><span class="nav-number">1.7.4.</span> <span class="nav-text">错误4：缺少Ant依赖</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#错误5：缺少C语言环境变量"><span class="nav-number">1.7.5.</span> <span class="nav-text">错误5：缺少C语言环境变量</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#第二次编译"><span class="nav-number">1.8.</span> <span class="nav-text">第二次编译</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#编写启动脚本"><span class="nav-number">1.9.</span> <span class="nav-text">编写启动脚本</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#启动脚本参考："><span class="nav-number">1.9.1.</span> <span class="nav-text">启动脚本参考：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#个人版本"><span class="nav-number">1.9.2.</span> <span class="nav-text">个人版本:</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#开始编译"><span class="nav-number">1.10.</span> <span class="nav-text">开始编译</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#问题收集："><span class="nav-number">1.11.</span> <span class="nav-text">问题收集：</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-编译过程突然报错，报错信息如下"><span class="nav-number">1.11.1.</span> <span class="nav-text">1. 编译过程突然报错，报错信息如下</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#参考资料："><span class="nav-number">1.12.</span> <span class="nav-text">参考资料：</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#处理问题的几个套路"><span class="nav-number">2.</span> <span class="nav-text">处理问题的几个套路</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#套路一：缺少依赖，却不知道安装的具体内容"><span class="nav-number">2.1.</span> <span class="nav-text">套路一：缺少依赖，却不知道安装的具体内容</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">阿东</p>
  <div class="site-description" itemprop="description">随遇而安</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">239</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">36</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">37</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2xhenlUaW1lcw==" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;lazyTimes"><i class="fa fa-fw fa-github"></i>GitHub</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="bWFpbHRvOjEwOTc0ODM1MDhAcXEuY29t" title="E-Mail → mailto:1097483508@qq.com"><i class="fa fa-fw fa-envelope"></i>E-Mail</span>
      </span>
  </div>


  <div class="links-of-blogroll motion-element">
    <div class="links-of-blogroll-title">
      <i class="fa fa-fw fa-link"></i>
      友情链接
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <span class="exturl" data-url="aHR0cHM6Ly93d3cuNTJwb2ppZS5jbi9ob21lLnBocD9tb2Q9c3BhY2UmdWlkPTE0OTc3MTgmZG89dGhyZWFkJnZpZXc9bWUmZnJvbT1zcGFjZQ==" title="https:&#x2F;&#x2F;www.52pojie.cn&#x2F;home.php?mod&#x3D;space&amp;uid&#x3D;1497718&amp;do&#x3D;thread&amp;view&#x3D;me&amp;from&#x3D;space">吾爱破解</span>
        </li>
        <li class="links-of-blogroll-item">
          <span class="exturl" data-url="aHR0cHM6Ly9qdWVqaW4uaW0vdXNlci8yOTk5MTIzNDUyNjI2MzY2" title="https:&#x2F;&#x2F;juejin.im&#x2F;user&#x2F;2999123452626366">掘金</span>
        </li>
        <li class="links-of-blogroll-item">
          <span class="exturl" data-url="aHR0cHM6Ly9zZWdtZW50ZmF1bHQuY29tL3UvbGF6eXRpbWVz" title="https:&#x2F;&#x2F;segmentfault.com&#x2F;u&#x2F;lazytimes">思否</span>
        </li>
    </ul>
  </div>

      </div>

      <div class="wechat_OA">
        <span>欢迎关注我的公众号</span>
        <br>
          <!-- 这里添加你的二维码图片 -->
        <img src ="https://adong-picture.oss-cn-shenzhen.aliyuncs.com/adong/wechat_channel.jpg">
      </div>
        <div class="back-to-top motion-element">
          <i class="fa fa-arrow-up"></i>
          <span>0%</span>
        </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">阿东</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
      <span class="post-meta-item-text">站点总字数：</span>
    <span title="站点总字数">2m</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span class="post-meta-item-text">站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">29:50</span>
</div>
  <div class="powered-by">由 <span class="exturl theme-link" data-url="aHR0cHM6Ly9oZXhvLmlv">Hexo</span> & <span class="exturl theme-link" data-url="aHR0cHM6Ly90aGVtZS1uZXh0Lm9yZw==">NexT.Gemini</span> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
  <script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : true,
      appId      : 'qMUpEEvBgXaMDD1b0ftgi9xr-gzGzoHsz',
      appKey     : 'UCdfT4Rfih6MO6y8DI4fstf6',
      placeholder: "Just go go",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : false,
      lang       : 'zh-CN' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
